/* 
 * File:   MapSite.h
 * Author: chb
 *
 * Created on 5. September 2009, 11:34
 */

#ifndef _MAPSITE_H
#define	_MAPSITE_H

#include "Position.h"
#include "View.h"

class Movable;

class MapSite {
public:
    MapSite(const unsigned int posX = 0, const unsigned int posY = 0);
    MapSite(const MapSite& orig);
    virtual ~MapSite();
    virtual void enter(Movable *m) = 0;
    virtual void paint(View *v) const = 0;
    
    typedef enum { MS_TILE, MS_WALL, MS_DOOR } MS_TYPE;
    
    virtual MS_TYPE getType() const = 0;
    virtual MapSite* clone(unsigned int x, unsigned int y) const = 0;

    void setLeftSide(MapSite *);
    void setRightSide(MapSite *);
    void setBottomSide(MapSite *);
    void setTopSide(MapSite *);

    MapSite* getLeftSide();
    MapSite* getRightSide();
    MapSite* getBottomSite();
    MapSite* getTopSite();

    const Position *getPosition() const;
    
protected:

    MapSite* _leftSide;
    MapSite* _rightSide;
    MapSite* _bottomSide;
    MapSite* _topSite;

    Position* _position;
};

#endif	/* _MAPSITE_H */

